package classes
{
	public class clt_plugins {
		private static const _MENU: Array = new Array();
		public function clt_plugins() {
		}
	
		public static function addPlugin(a_caption: String, a_class: Class, a_params: Object=null): void {
			_MENU.push({
				caption	: a_caption,
				Class	: a_class,
				params	: a_params
			});
		}

		public static function get menuList(): Array {
			return _MENU;
		}
		
		public static function doMenuSelect(a_clt: clt_clothingBase, menuObj: Object): void {
			if (!menuObj.object) {
				menuObj.object = new menuObj.Class(a_clt);
			}
			menuObj.object.execute(menuObj.params);
		}
	}
}